<template>
  <div class="wrapper">
      <swiper :options="swiperOption">
        <!-- slides -->
        <swiper-slide v-for="item of swiperList" :key="item.id">
          <img class="swiper-img" :src="item.imgUrl">     
        </swiper-slide>
        <!-- Optional controls -->
        <div class="swiper-pagination"  slot="pagination"></div>
      </swiper>
  </div>
</template>

<script>
export default{
    name :'HomeSwiper',
    data () {
        return {
            swiperOption: {
                pagination: '.swiper-pagination',
                loop: true
            },
            swiperList: [{
                id: '0001',
                imgUrl: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/20193/d7bbc21db442366a882e04ddc984669a.jpg_750x200_85e640d9.jpg'
            },{
                id: '0002',
                imgUrl: 'http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/20197/ff3a6bbd0367b007a047c2e2329264e6.jpg_750x200_15e97002.jpg'
            }]
        }
    }
};
</script>

<style lang="stylus" scoped>
    // 样式穿透 穿透scoped限制
    .wrapper>>>.swiper-pagination-bullet-active
      background: #fff !important
    .wrapper
      overflow: hidden
      width: 100%
      height: 0
      padding-bottom: 26.7%
      background-color: #eee 
    .swiper-img
      width: 100%
</style>